<?php
namespace app\api\controller;
class Cpzx extends Index
{
    /**
     * 张凯迪
     * 时间：19.11.21 15:35
     * 产品中心表的链接
     */
    public function index(){
        //找到cpzx的model
        $model= new\app\admin\model\Cpzx();
        //查询cpzx
        $stu=$model->join('tplay_nav ','tplay_cpzx.nav_id=tplay_nav.id' )
            ->field('tplay_cpzx.id,tplay_cpzx.title,tplay_cpzx.img,tplay_cpzx.content,tplay_nav.navname')
            ->where(1)
            ->limit(0,10)
            ->select();
        //返回值
        return json([200,"成功",$stu]);
    }
}